Skip to content

Extract shared error helpers and add comprehensive test coverage#26

Merged
dadachi merged 1 commit intomainfrom
refactor/extract-shared-concerns
Mar 16, 2026
Merged

Extract shared error helpers and add comprehensive test coverage#26
dadachi merged 1 commit intomainfrom
refactor/extract-shared-concerns

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Mar 16, 2026

Summary

  • Extract render_validation_error and render_error helpers into BaseController, replacing duplicated JSON error rendering across all shopkeeper controllers
  • Add comprehensive test coverage for all controller actions and model methods (happy + unhappy paths)
  • Add testing policy to CLAUDE.md

Test plan

  • All 401 tests pass (798 assertions, 0 failures, 0 errors)
  • Every controller action tested for both happy and unhappy paths (validation errors, not found, unauthorized)
  • New BaseController tests for render_validation_error and render_error
  • bin/rubocop - No lint errors
  • bin/brakeman - No security issues
  • Run bin/rails test to verify

🤖 Generated with Claude Code

…and add comprehensive test coverage

- Extract render_validation_error and render_error helpers into BaseController, replacing duplicated JSON error rendering across all shopkeeper controllers
- Add comprehensive test coverage for all controller actions (happy + unhappy paths)
- Add testing policy to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 8e251cc into main Mar 16, 2026
3 checks passed
@dadachi dadachi deleted the refactor/extract-shared-concerns branch March 16, 2026 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant